home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
ansi
/
swears10.zip
/
SWEARS.DOC
< prev
next >
Wrap
Text File
|
1991-06-25
|
13KB
|
164 lines
Help!
Here's the first release beta version of my "swears" curses-look-alike lib
for the pc environment. BUT I need help. This package is far from complete,
so why don't you try it with your Quick C compiler, and e-mail me some
suggestions...
Thanks!
Jim Dunn, dunn@andrews.edu
/**************************************************************************\
* Swears *
* by Professor Von Ignatius Pseudo, E.K.C.P. *
* *
* Swears is a C add-on library giving you various windowing and utility *
* functions provided in unix curses. There's no termcap, but there IS *
* direct video screen writes with TRUE refresh functions! Use at your *
* own risk... *
* *
* This implementation of Swears is for the Microsoft Quick C language on *
* the IBM PC compatibles, based on the unix curses package. You'll need *
* the two files: SWEARS.H and SWEARS.LIB (renamed from SWEARS_x.LIB) and *
* these two files may be renamed to CURSES.H and CURSES.LIB if you like. *
* As usual, if you are having any problems, you might try a vacation... *
* *
* Swears is TOTALLY, COMPLETELY, ENTIRELY free! You may use the Swears *
* library to create any program, either free or for sale, without paying *
* any royalty fees. You don't even have to display any sort of Swears *
* logo, copyright or info about Swears in your program, at all. Swears *
* is IdeaRighted (I) 1990 by ACME F.S.P.F. Please see attached document. *
* *
* Yes, this was another TEAM ATTACK project... *
* "I tried to get the team to work on it, but they attacked me !?!" *
* -Professor Von Ignatius Pseudo, E.K.C.P. *
\***************************************************************************/
┌──────────────────────────────────────────────────────────────────────────┐
│ │
│ NAME │
│ │
│ swears - screen functions to emulate the unix curses library. │
│ │
│ SYNTAX │
│ │
│ #include <swears.h> │
│ │
│ This will automatically include the stdio.h header file. │
│ │
│ DESCRIPTION │
│ │
│ This version of curses for the pc is based upon a direct │
│ screen write algorithm. No termcap is used, just arrays and │
│ video memory writes. The original screen is saved, an image │
│ of the screen is built in memory and that memory is written │
│ to the screen each time the REFRESH() function is called. │
│ The INITSCR() function MUST be used before any other of the │
│ functions, and you MUST end with ENDWIN() before exiting. │
│ │
│ FUNCTIONS │
│ │
│ addch(ch) add a character to stdscr │
│ addstr(str) add a string to stdscr │
│ │
│ box(win,vert,hor) draw a box around a window │
│ │
│ cbreak() set cbreak mode │
│ clear() clear stdscr │
│ clearok(scr,boolf) set clear flag for scr │
│ clrtobot() clear to bottom on stdscr │
│ clrtoeol() clear to end of line on stdscr │
│ │
│ delch() delete a character │
│ deleteln() delete a line │
│ delwin(win) delete win │
│ │
│ echo() set echo mode │
│ endwin() end window modes │
│ erase() erase stdscr │
│ │
│ flushok(win,boolf) set flush-on-refresh flag for win │
│ │
│ getch() get a char through stdscr │
│ getcap(name) get terminal capability name │
│ getstr(str) get a string through stdscr │
│ gettmode() get tty modes │
│ getyx(win,y,x) get (y,x) co-ordinates │
│ │
│ inch() get char at current (y,x) co-ordinates │
│ initscr() initialize screens │
│ insch(c) insert a char │
│ insertln() insert a line │
│ │
│ leaveok(win,boolf) set leave flag for win │
│ longname(termbuf,name) get long name from termbuf │
│ │
│ move(y,x) move to (y,x) on stdscr │
│ mvcur(lasty,lastx,newy,newx) │
│ actually move cursor │
│ newwin(lines,cols,begin_y,begin_x) │
│ create a new window │
│ nl() set newline mapping │
│ nocbreak() unset cbreak mode │
│ noecho() unset echo mode │
│ nonl() unset newline mapping │
│ noraw() unset raw mode │
│ │
│ overlay(win1,win2) overlay win1 on win2 │
│ overwrite(win1,win2) overwrite win1 on top of win2 │
│ │
│ printw(fmt,arg1,arg2,...)